package com.prototype.deepclone.self;

public class Client {

    public static void main(String[] args) throws CloneNotSupportedException {
        DeepCopyTarget deepCopyTarget = new DeepCopyTarget("水牛","耕田");
        DeepCopyType deepCopyType = new DeepCopyType("牛",deepCopyTarget);
        DeepCopyType clone = (DeepCopyType) deepCopyType.clone();
        System.out.println("deepCopyType的hashcode"+deepCopyType.hashCode()+"clone的hashcode"+clone.hashCode());
        DeepCopyType clone1 = (DeepCopyType) deepCopyType.getClone();
        System.out.println("deepCopyType的hashcode"+deepCopyType.hashCode()+"clone1的hashcode"+clone1.hashCode());
    }
}
